package builder;

import java.util.Vector;

import model.Action;

public class MementoBuilder extends AbstractPatternBuilder {

	private String originator = "Originator";
	private String memento = "Memento";
	private String caretaker = "Caretaker";
	
	public MementoBuilder() {
		super();
	}

	@Override
	public Vector<Action> buildPattern() {
		
		this.buildClass(originator);
		this.buildClass(memento);
		this.buildClass(caretaker);
		
		this.buildDependency(originator, memento);
		
		this.buildAggregation(memento, caretaker);
		
		return patternActions;
	}

	@Override
	public void changeNames() {

		originator = names.get(0);
		memento = names.get(1);
		caretaker = names.get(2);
		
	}
	
	@Override
	public int cantUMLElements() {
		return 3;
	}

}
